package com.zzyl.mapper;

import com.zzyl.entity.Resource;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ResourceMapper {

    List<Resource> list(Resource resource);

    @Select("select * from sys_resource where resource_no = #{resourceNo}")
    Resource selectByResourceNo(String parentResourceNo);

    void add(Resource resource);

    void updateState(Resource resource);

    void update(Resource resource);

    void delete(String resourceNo);

    List<Resource> getAllChildren(@Param("parentResourceNo") String parentResourceNo);
}
